#ifndef __TwAvatar_H__
#define __TwAvatar_H__

#include "TwD3DHeaders.h"
#include "TwSceneManager.h"
#include "TwCamera.h"

#define TwAvatarImageset	"TwAvatarImageset"
#define TwAvatarImage		"TwAvatarImage"
#define TwAvatarImageValue	"set:TwAvatarImageset image:TwAvatarImage"

class TwAvatar
{
public:
	TwAvatar();
	virtual ~TwAvatar();

	bool creat(unsigned int width, unsigned int height);
	void update();
	void render(TimeValue t);
	IDirect3DTexture9* getTexture();

	void clearup();

protected:
	bool _createScene();

protected:
	TwSceneManager*			mScene;

	IDirect3DTexture9*		mTexture;
	IDirect3DSurface9*		mSurface;
	IDirect3DSurface9*		mOldSurface;
};

#endif //__TwAvatar_H__